<script>
export default {
  name: 'DaoHang',
  data () {
    return {
      activeIndex: '1',
      activeIndex2: '1'
    }
  },
  methods: {
    handleSelect (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>

<template>
  <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
    <div class="flex" style="max-width: 1920px">
      <div class="flex tozy" >
        <el-menu-item index="1">处理中心</el-menu-item>
        <el-submenu index="2" style="width: 125px">
          <template slot="title">我的工作台</template>
          <el-menu-item index="2-1">选项1</el-menu-item>
          <el-menu-item index="2-2">选项2</el-menu-item>
          <el-menu-item index="2-3">选项3</el-menu-item>
          <el-submenu index="2-4">
            <template slot="title">选项4</template>
            <el-menu-item index="2-4-1">选项1</el-menu-item>
            <el-menu-item index="2-4-2">选项2</el-menu-item>
            <el-menu-item index="2-4-3">选项3</el-menu-item>
          </el-submenu>
        </el-submenu>
      </div>
      <div class="hidden-sm-and-down flex" style="width: 50vw">
        <el-menu-item index="3">消息中心</el-menu-item>
        <el-menu-item index="4"><a href="https://www.ele.me" target="_blank">订单管理</a>
        </el-menu-item>
      </div>
    </div>
    <i class="el-icon-menu hidden-md-and-up yidong1"></i>
  </el-menu>
</template>

<style scoped>
.el-menu-demo {
  background: transparent;
  display: flex;
  width: 100%;
  justify-content: center;
  .flex {
    display: flex;
    justify-content: center;
  }
  .tozy{
    width: 50vw
  }
  .yidong1 {
    line-height: 60px;
    margin-right: -17vw;
  }
}
@media (max-width: 992px) {
  .el-menu-demo{
    justify-content: space-between;
  }
}
</style>
